/**
 * MineAdmin is committed to providing solutions for quickly building web applications
 * Please view the LICENSE file that was distributed with this source code,
 * For the full copyright and license information.
 * Thank you very much for using MineAdmin.
 *
 * @Author X.Mo<root@imoi.cn> And NEKGod<1559096467@qq.com>
 * @Link   https://github.com/mineadmin
 */

// 在线状态枚举
export enum OnlineStatus {
  ONLINE = 1,  // 在线
  OFFLINE = 2, // 离线
}

// 在线状态选项配置（用于表单单选框）
export function rdDeviceRodOnlineStatusDictData() {
  return [
    { label: "在线", value: OnlineStatus.ONLINE },
    { label: "离线", value: OnlineStatus.OFFLINE },
  ];
}

// 在线状态映射（用于表格显示）
export const ONLINE_STATUS_MAP = {
  [OnlineStatus.ONLINE]: { text: "在线", type: "success" },
  [OnlineStatus.OFFLINE]: { text: "离线", type: "danger" },
};

// 默认在线状态
export const DEFAULT_ONLINE_STATUS = OnlineStatus.ONLINE;

// 生成时间戳函数
export function generateTimestamp(): string {
  return Date.now().toString();
}

